package xyz.lwm.lazycat.utility.metaobject;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * 元对象, bean object 或 map object
 *
 * @author lwm
 */
public interface MetaObject {

    /**
     * get all property names
     */
    @NotNull
    List<String> findPropertyNames();

    /**
     * get property value
     *
     * @param propertyName property name
     * @return property value
     */
    @Nullable
    Object getValue(@NotNull String propertyName);

    /**
     * set property value
     *
     * @param propertyName property name
     * @param value property value
     */
    void setValue(@NotNull String propertyName, @Nullable Object value);

}
